/*******************************************************************************
 * Copyright (c) 2012 Daniele Parisi.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     Daniele Parisi
 *     neb.inf@gmail.com
 *     http://www.danieleparisi.com/
 ******************************************************************************/
package org.jxreport.core.views.chart;

import org.jxreport.core.HTMLUtils;
import org.jxreport.core.Table;
import org.jxreport.core.XMLUtils;
import org.jxreport.core.XMLValues;
import org.jxreport.core.views.ViewObject;
import org.w3c.dom.Element;

public abstract class ChartView extends ViewObject{

	protected String chartId = "chartId_" + HTMLUtils.getRandomInt();
	
	boolean showLegend = false;
	
	public ChartView(Element viewElement, Table table) {
		super(viewElement, table);
		
		this.showLegend = XMLUtils.getBoolValue(viewElement, XMLValues.SHOW_LEGEND);
	}

	public boolean isShowLegend() {
		return showLegend;
	}

	public void setShowLegend(boolean showLegend) {
		this.showLegend = showLegend;
	}
}
